import Vue from 'vue'
import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location, onResolve, onReject) {
  if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
  return originalPush.call(this, location).catch(err => err)
}
Vue.use(Router)
export default new Router({
  routes: [{
      path: '/',
      name: 'Home',
      component: () => import("@/views/index")
    },
    {
      path: '/pretraining',
      name: 'pretraining',
      component: () => import("@/views/pretraining")
    },
    {
      path: '/connectus',
      name: 'connectus',
      component: () => import("@/views/connectus")
    },
    {
      path: '/policy',
      name: 'policy',
      component: () => import("@/views/policy")
    },
    {
      path: '/newslist',
      name: 'newslist',
      component: () => import("@/views/newslist")
    },
    {
      path: '/newsdetail',
      name: 'newsdetail',
      component: () => import("@/views/newsdetail")
    },
    {
      path: '/boardlist',
      name: 'boardlist',
      component: () => import("@/views/boardlist")
    },
    {
      path: '/boarddetail',
      name: 'boarddetail',
      component: () => import("@/views/boarddetail")
    },
    {
      path: '/personalcenter',
      name: 'personalcenter',
      component: () => import("@/views/personalcenter")
    },
    {
      path: '/centerintro',
      name: 'centerintro',
      component: () => import("@/views/centerintro")
    }
  ]
})
